<html>
<head>
<title>shellDemo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body >
<h1>NW.JS shell</h1>
<button onclick="openInexplorer()">在默认浏览器中打开玄魂的电子书</button>
<button onclick="openPdf()">打开pdf</button>
<button onclick="showPdfInFloder()">打开pptx所在的文件夹</button>
<script>
    // Load native UI library.
    var gui = require('nw.gui');
    var shell = gui.Shell;
    function openInexplorer()
    {
        shell.openExternal('http://ebook.xuanhun521.com');
    }
    function openPdf()
    {
        shell.openItem('C:\\Users\\92809\\Desktop\\screencapture-sitepoint-premium-library-2020-04-27-10_36_34.pdf');
    }
    function showPdfInFloder()
    {
        shell.showItemInFolder('C:\\Users\\92809\\Desktop\\Vscode +Python快速配置.pptx');
    }
</script>
</body>
</html>